#!/bin/sh
firmware_name=$(nvram get firmware_name)
firmware_version=$(nvram get firmware_version)
if [ -z "$firmware_name" ]; then
	nvram set firmware_name="OpenWrt White Russian"
	nvram set firmware_subtitle="With X-Wrt Extensions"
fi
if grep -q "RC5" "/etc/banner"; then
	if [ "$firmware_version" != "RC5" ]; then
		nvram set firmware_version="RC5"
	fi
elif grep -q "RC6" "/etc/banner"; then
	if [ "$firmware_version" != "RC6" ]; then
		nvram set firmware_version="RC6"
	fi
elif grep -q "0.9" "/etc/openwrt_version"; then
	if [ "$firmware_version" != "0.9" ]; then
		nvram set firmware_version="0.9"
	fi
else
	nvram set firmware_version="unknown version"		
fi



